Skip to content

Scope ownership changes to TetherKit's installed files only - #11

Open
justsrc wants to merge 2 commits into
mainfrom
fix/install-helper-scoped-chown
Open

justsrc wants to merge 2 commits into
mainfrom
fix/install-helper-scoped-chown

Conversation

@justsrc

@justsrc justsrc commented Nov 21, 2026

Copy link
Copy Markdown
Owner

This pull request updates the ownership and permissions logic in the install-helper.sh script to more safely handle files in /Library/PrivilegedHelperTools, especially when dealing with files protected by macOS access controls. The changes ensure that only the relevant files installed by this tool are modified, preventing errors that could previously cause the installation to appear successful even when it was incomplete.

Ownership and permissions handling improvements:

  • Changed chown to operate only on the top-level ${TOOLS_DIR} directory instead of recursively, to avoid errors with protected bundles in /Library/PrivilegedHelperTools.
  • Added explicit ownership changes for ${INSTALL_PATH} and for specific .dylib files (libtethernet*.dylib and libusb-*.dylib) if they exist, using chown -h to handle symlinks safely.
  • Updated the permissions logic to only apply chmod 444 to the relevant .dylib files, avoiding unintended changes to unrelated files.

Arpit-Khandelwal and others added 2 commits October 14, 2026 01:00
install-helper.sh recursively chowns the entire shared
/Library/PrivilegedHelperTools directory. When another app has already
installed a macOS-protected helper bundle there (e.g.
ChromeRemoteDesktopHost.app, which carries a com.apple.macl attribute),
chown returns "Operation not permitted" on those files. Under
`set -euo pipefail` the script aborts right there — before it copies the
LaunchDaemon plist and runs `launchctl bootstrap`. The helper binary and
dylibs land on disk, but the daemon is never registered, so the install
appears to finish while the helper stays permanently unreachable.

Only chown/chmod the files this tool actually installs (the helper
binary and its libtetherkit/libusb dylibs) instead of the entire shared
directory. Other apps' helpers in the same directory are left untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants